@csrf
<div class="layui-form-item">
    <label for="block" class="layui-form-label">版块</label>
    <div class="layui-input-block">
        <input type="text" id="block" name="block" lay-filter="block" class="layui-input"
            value="{{$template->block??''}}">
    </div>
</div>
<div class="layui-form-item">
    <label for="content" class="layui-form-label">模板名称</label>
    <div class="layui-input-block">
        <input type="text" name="content[name]" class="layui-input" value="{{$template->content ? $template->content['name'] :''}}">
    </div>
</div>
<div class="layui-form-item">
    <label for="content" class="layui-form-label">模板内容</label>
    <div class="layui-input-block">
        <textarea type="text" name="content[content]" class="layui-textarea">{{$template->content ? $template->content['content'] :''}}</textarea>
    </div>
</div>
<div class="layui-form-item">
    <label for="stations" class="layui-form-label">岗位编号</label>
    <div class="layui-input-block">
        <div id="stations" class="xm-select-demo"></div>
    </div>
</div>
<div class="layui-form-item">
    <label for="sort_code" class="layui-form-label">排序</label>
    <div class="layui-input-block">
        <input type="text" name="sort_code" class="layui-input" value="{{$template->sort_code??''}}">
    </div>
</div>
<div class="layui-form-item">
    <label for="is_public" class="layui-form-label">是否公共</label>
    <div class="layui-input-block">
        <input type="hidden" name="is_public" value="0">
        <input type="checkbox" name="is_public" lay-skin="switch" lay-text="公共|非公共" value="1" {{$template->is_public=='1'?'checked':''}}>
    </div>
</div>
<div class="layui-form-item">
    <label for="description" class="layui-form-label">备注</label>
    <div class="layui-input-block">
        <textarea type="text" name="description" class="layui-textarea"
            value="{{$template->description??''}}"></textarea>
    </div>
</div>